import request from '@/utils/request'

export function hotel (id) {
  return request({
    url: '/home/groups',
    params: {
      area: id
    }
  })
}

// 获取城市详情
export function getcitydetails (id) {
  return request({
    url: '/houses/condition',
    params: {
      id
    }
  })
}
// 获取热门城市
export function hotcity () {
  return request({
    url: '/area/hot'
  })
}

// 所有城市
export function citys () {
  return request({
    url: '/area/city?level=1'
  })
}

// 房屋筛选数据
export function getfilterdata (id) {
  return request({
    url: '/houses/condition',
    params: {
      id
    }
  })
}

// 房屋小区关键查询
export function getcommunity (name, id) {
  return request({
    url: '/area/community',
    params: {
      name,
      id
    }
  })
}

// 房屋的筛选
export function filterhouses (params) {
  return request({
    url: '/houses',
    params
  })
}
